<?php


namespace app\plugins\goods\admin\service;


use app\admin\exception\LogicException;
use app\admin\model\FileManager;
use app\common\model\BaseModel;
use app\plugins\goods\admin\validate\TagsValidate;
use helper\form\Builder;

class Tags extends \app\admin\service\AdminService
{

    protected function init()
    {
        $this->model = new \app\plugins\goods\admin\model\GoodsTags();
    }


    public function getHtml():string
    {
          $config = [
            [//输入框
                'title' => '标签名',
                'key'   => 'title',
                'value' => '',
                'tips'  => '请输入标签名',
                'type'  => 'text'
            ],
            [//输入框
                'title' => '图标',
                'key'   => 'icon',
                'value' => '',
                'tips'  => '请选择图标',
                'type'  => 'image'
            ],
            [//输入框
                'title' => '状态',
                'key'   => 'status',
                'value' => 'on',
                'tips'  => '请选择状态',
                'type'  => 'switch',
                'option' => '显示|隐藏',
            ],
            [//输入框
                'title' => '排序',
                'key'   => 'sort',
                'value' => '',
                'tips'  => '请输入排序值数值越小越靠前',
                'type'  => 'number',
                'option' => '',
            ],
        ];
          return (new Builder($config))->getHtml();
    }
}